package cn.tiansu.eway.kylinengine.manager;


public class Test
{
	public static void main(String[] args) {
		
		String str1 = "{\"olaps\":[{\"tenant\":\"wulaoban1\",\"measurements\": [{\"name\": \"sum\"}],"
				+ "\"dimentions\": [{\"dim\": \"dim_time\",\"levels\":[{\"year_int\": 2016,\"month_int\": \"3\",\"day_int\": \"10\"},{\"year_int\": 2015,\"month_int\": \"3\",\"day_int\": \"10\"}]}]"
				+ ",\"conditions\":[{\"dim\": \"dim_region\",\"levels\":[{\"province\": \"北京\", \"city\": \"北京\"}]}]"
				+ "}]}";
		
		String str2 = "{\"olaps\":[{\"tenant\":\"newcity\",\"measurements\": [{\"name\": \"sum\"}],"
				+ "\"dimentions\": [{\"dim\": \"dim_category\",\"levels\":[{\"category_Level1\": \"能耗\"}]},{\"dim\": \"dim_business2\",\"levels\":[{\"business2_Level1\": \"children\"}]}]"
				+ ",\"conditions\":[{\"dim\": \"dim_region\",\"levels\":[{\"province\": \"江苏\", \"city\": \"南京\"}]}]"
				+ "}]}";
		
		String str= "{\"msg\":{\"addTenant\":[\"aaa\",\"bbb\"],\"delTenant\": []}}";
		
//		String str= "{\"changeData\":[{\"tenant\":\"newcity\",\"time\":\"2015-10-14 \"}]}";
		 
		
		
		
		KYLINEngineListener l = new KYLINEngineListener();
		
		l.sendMessageTest(str1);
		
//		for(int i=0;i<1;i++)
//		{                                        
//			String druidStr = "{\"timestamp\": \"2015-12-07T07:40:08.068Z\", \"page\": \"Gypsy Danger\", \"language\" : \"en\", \"user\" : \"nuclear\", \"unpatrolled\" : \"true\", \"newPage\" : \"true\", \"robot\": \"false\", \"anonymous\": \"false\", \"namespace\":\"article\", \"continent\":\"North America\", \"country\":\"United States\", \"region\":\"Bay Area\", \"city\":\"San Francisco\", \"added\": "+i+", \"deleted\": "+(100+i)+", \"delta\": "+(200+i)+"}";
//			l.sendMessageTest(druidStr);
//			try
//			{
//				Thread.sleep(1000);
//			} catch (InterruptedException e)
//			{
//				e.printStackTrace();
//			}
//		}
		
		
		
		
		
		
		
//		TestThread t2 = new TestThread(str2);
//		t2.start();
		
		
		
    }

}
